# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=slither
pkgver=4851.f9710ded1
_pyver=3.13
pkgrel=1
epoch=1
pkgdesc='Solidity static analysis framework written in Python 3.'
arch=('any')
groups=('blackarch' 'blackarch-code-audit' 'blackarch-exploitation')
url='https://github.com/crytic/slither'
license=('AGPL3')
depends=('python' 'python-setuptools' 'python-prettytable' 'python-pysha3'
         'python-crytic-compile')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/crytic/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests/"
}

